define(function (require, exports, module) {
        var angular = require('angular');
        require("pagination");
        require("angular-ui");
        require("/public/js/plugins/select2/select2");
        require('/public/js/myservice/contract/contract-common');
        var myMath = require('/public/js/myservice/common/my-math');
        var dialog = require("dialogplus");
        var util = require("util");
        var api_prefix = G_CONFIG["api_prefix"]; //api前缀
        var side = require('/public/js/myservice/side');
        var moment = require('moment');

    angular.module('myedit', ['select2', 'ngUI', 'ContractCommonService'])
        .controller('myeditCtrl',['$scope','$routeParams','contractCommonService', function ($scope,$routeParams,contractCommonService) {
            $scope.loadData = function (contractid) {
                contractCommonService.getContract(contractid, function (data) {
                    $scope.contract_code = data.contract.contract_code;
                    $scope.contract_id = contractId;
                })
            };
            $scope.$watch('contract_code', function (ival) {
                //util.alert('修改后的值为:' + ival);
            })

            var contractId = $routeParams.id;
            var type=$routeParams.type;
            $scope.type = type;
            $scope.loadData(contractId);
        }])
}
)